/**
 * 隐性成本数据
 */
import React  from 'react'
import style from './index.less'
import { DataNone} from '../../components'
import {Table} from 'antd';


const ImCostData =({data})=>{
  const myProps={
    columns:data.tableTitle.map((item,i)=>({
      title:item.name,
      key:item.column,
      dataIndex:item.column
    })),
    dataSource: data.tableData,
    rowKey:data.keyRow
  }
  return (
              <div className={`table ${style.table}`}>
                {
                  data?<Table {...myProps} pagination={false} size="small"/>: <DataNone />
                }
              </div>
        )
}

// ImCostData.propTypes={
// data
// }

export default ImCostData
